Apparatus for encoding and decoding image using adaptive dct coefficient scanning based on pixel similarity and method therefor

ABSTRACT

The present invention discloses an encoding apparatus using a Discrete Cosine Transform (DCT) scanning, which includes a mode selection means for selecting an optimal mode for intra prediction; an intra prediction means for performing intra prediction onto video inputted based on the mode selected in the mode selection means; a DCT and quantization means for performing DCT and quantization onto residual coefficients of a block outputted from the intra prediction means; and an entropy encoding means for performing entropy encoding onto DCT coefficients acquired from the DCT and quantization by using a scanning mode decided based on pixel similarity of the residual coefficients.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 12/377,617filed on Feb. 16, 2009, which is a U.S. National Stage application ofInternational Application No. PCT/KR2007/001433 filed on Mar. 23, 2007,which claims the benefit of Korean Application Nos. 10-2006-0077851filed on Aug. 17, 2006, and 10-2007-0008247 filed on Jan. 26, 2007. Theentire disclosures of application Ser, No. 12/377,617, InternationalApplication No. PCT/KR2007/001433, and Korean Application Nos.10-2006-0077851 and 10-2007-0008247 are incorporated herein by referencefor all purposes.

TECHNICAL FIELD

The present invention relates to an encoding/decoding apparatus andmethod using an adaptive Discrete Cosine Transform (DCT) coefficientscanning based on pixel similarity. More particularly, the presentinvention relates to an encoding/decoding apparatus and method whichperforms intra prediction onto input video, predicts pixel similaritybased on pixel similarity information of coefficients to be encoded thatis acquired from adjacent pixels in the intra-predicted video, andperforms a most effective scanning, e.g., Discrete Cosine Transform(DCT) coefficient scanning, according to the predicted pixel similarity.

BACKGROUND ART

According to video compression standards for encoding/decoding videodata, a frame is divided into a plurality of macro blocks and a macroblock may be divided into a plurality of sub-blocks. Theencoding/decoding is performed on the basis of a macro block unit or asub-block unit based on temporal prediction and spatial prediction.

Herein, the temporal prediction is to predict motion of macro blocks orsub-blocks of a current frame by referring to blocks of adjacent frames.

The spatial prediction is to predict motion of macro blocks orsub-blocks of a current frame to be encoded by using boundary pixels ofalready recovered adjacent blocks.

The spatial prediction is also called intra prediction. The intraprediction takes advantage of a characteristic that when a pixel ispredicted, pixels adjacent to it are highly likely to have similarvalues.

H.264/Advanced Video Coding (AVC) standard technology can compress videoabout twice as high as Moving Picture Experts Group 2 (MPEG-2) and aboutone and a half times as high as MPEG-4 by using such technique as intraprediction encoding, ¼-pixel based variable block motion prediction andcompensation, Context-based Adaptive Variable Length Coding (CAVLC), andContext-based Adaptive Binary Arithmetic Coding (CABAC).

The H.264/AVC standard predicts pixel values of a current block by usingprediction modes of 9 directivities.

FIG. 1 illustrates 9 prediction modes used for intra prediction of 4×4blocks.

As illustrated in FIG. 1, the 9 prediction modes used for intraprediction of 4×4 blocks include a vertical mode (mode 0), a horizontalmode (mode 1), a direct current (DC) mode (mode 2), a diagonal_down_leftmode (mode 3), a diagonal_down_right mode (mode 4), a vertical_rightmode (mode 5), a horizontal_down mode (mode 6), a vertical_left mode(mode 7), and a horizontal_up mode (mode 8).

Herein, in the DC mode (mode 2), intra prediction is performed using amean value of adjacent pixels. The arrows indicate predictiondirections.

Meanwhile, intra 16×16 prediction encoding includes a total of fourmodes, which are a vertical mode, a horizontal mode, a DC mode, and aplane mode.

Also, intra 8×8 prediction encoding includes a total of 9 modes, justlike the intra 4×4 prediction encoding. As for color difference signals,intra 8×8 prediction encoding is performed, and the intra 8×8 predictionencoding includes a DC mode, a vertical mode, a horizontal mode, and aplane mode and so on.

Hereinafter, prediction methods in the vertical and horizontal modes forintra prediction of 4×4 blocks will be described with reference to FIGS.2 and 3.

FIG. 2 exemplarily illustrates a pixel prediction method in a verticaldirection in a 4×4 block 200.

As shown in FIG. 2, pixel a 201, pixel e 202, pixel i 203, and pixel m204 are predicted based on an adjacent pixel A in the verticaldirection.

Also, pixels b, f, j and b are predicted based on an adjacent pixel B inthe vertical direction, and pixels c, g, k and o are predicted based onan adjacent pixel C in the vertical direction. Pixels d, h, l and p arepredicted based on an adjacent pixel D in the vertical direction.

FIG. 3 exemplarily illustrates a pixel prediction method in a horizontaldirection in a 4×4 block 200.

As illustrated in FIG. 3, pixel a 205, pixel b 206, pixel c 207, andpixel d 208 are predicted based on an adjacent pixel l in a horizontaldirection.

Also, pixels e, f, g and h are predicted based on an adjacent pixel J inthe horizontal direction, and pixels i, j, k and l are predicted basedon an adjacent pixel K in the horizontal direction. Pixels m, n, o and pare predicted based on an adjacent pixel L in the horizontal direction.

An encoder performs Discrete Cosine Transform (DCT) and quantizationonto residual signals (which are of a pixel area) acquired bycalculating differences between the predicted pixels and the currentpixels. Subsequently, the encoder performs zigzag scanning and entropyencoding onto the transformed coefficients obtained from DCT andquantization.

Herein, although the zigzag scanning takes advantage of an energycompaction characteristic of a transformed coefficient that energyconverges into low frequency components and energy appears little inhigh frequency components, the energy compaction after intra predictionis not always effective.

In short, the zigzag scanning is a method of scanning a transformedcoefficient from low frequency components to high frequency components.When distribution of transformed coefficients appears more in the lowfrequency components, the zigzag scanning is effective. However, whenspatial prediction having directivity is used, the distribution oftransformed coefficients is influenced by the direction of prediction.Therefore, it is ineffective to apply the zigzag scanning to theprediction of all directions.

DISCLOSURE Technical Problem

An embodiment of the present invention, which is devised to overcome theabove problems, is directed to providing an encoding/decoding apparatusand method which performs intra prediction onto input video, predictspixel similarity based on pixel similarity information of coefficientsto be encoded acquired from adjacent pixels in the intra-predictedvideo, and performs a most effective scanning, e.g., DCT coefficientscanning, according to the predicted pixel similarity.

Other objects and advantages of the present invention can be understoodby the following description, and become apparent with reference to theembodiments of the present invention. Also, it is obvious to thoseskilled in the art of the present invention that the objects andadvantages of the present invention can be realized by the means asclaimed and combinations thereof.

Technical Solution

In accordance with an aspect of the present invention, there is providedan encoding apparatus using a Discrete Cosine Transform (DCT) scanning,which includes a mode selection means for selecting an optimal mode forintra prediction; an intra prediction means for performing intraprediction onto video inputted based on the mode selected in the modeselection means; a DCT and quantization means for performing DCT andquantization onto residual coefficients of a block outputted from theintra prediction means; and an entropy encoding means for performingentropy encoding onto DCT coefficients acquired from the DCT andquantization by using a scanning mode decided based on pixel similarityof the residual coefficients.

In accordance with another aspect of the present invention, there isprovided a decoding apparatus using a DCT scanning, which includes anentropy decoding means for performing entropy decoding onto encodedvideo; a scanning decision means for deciding a scanning mode for thevideo decoded in the entropy decoding means; and a video recovery meansfor recovering the video based on the scanning mode decided in thescanning decision means.

In accordance with another aspect of the present invention, there isprovided an encoding method using a DCT scanning, which includes thesteps of selecting an optimal mode for intra prediction; performingintra prediction onto video inputted based on the mode selected in themode selection step; performing DCT and quantization onto residualcoefficients of a block outputted from the intra prediction step;deciding pixel similarity of the residual coefficients; and performingentropy encoding onto DCT coefficients acquired from the DCT andquantization by using a scanning mode decided in the pixel similaritydecision step.

In accordance with an aspect of the present invention, there is provideda decoding method using a DCT scanning, which includes the steps ofperforming entropy decoding onto encoded video; deciding a scanning modefor the video decoded in the entropy decoding step; and recovering thevideo based on the scanning mode decided in the scanning decision step.

According to an embodiment of the present invention, a luminance blockmay go through an intra 4×4 luminance encoding mode of H.264/AdvancedVideo Coding (AVC), which includes a vertical mode, a horizontal mode, adiagonal_down_left mode, a diagonal_down_right mode, a vertical_rightmode, a horizontal_down mode, a vertical_left mode, and a horizontal_upmode, and an intra 16×16 luminance encoding mode of H.264/AVC, whichincludes a vertical mode, a horizontal mode, a plane mode, and a DCmode.

Also, according to an embodiment of the present invention, a chrominanceblock may go through an intra M×N chrominance encoding mode ofH.264/AVC, which includes a vertical mode, a horizontal mode, a planemode and a DC mode.

Advantageous Effects

As described above, the present invention can improve a compression rateof intra encoding by applying a most effective scanning method accordingto pixel similarity in order to encode/decode video.

Also, the present invention can improve a video compression rate bybeing applied to a video compression technology using intra prediction,which will be developed in the future.

Also, the present invention can reduce a need for an additional moduleby applying the same similarity information to both encoder and decoder.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates 9 prediction modes used for intra prediction of 4×4blocks according to H.264/AVC.

FIG. 2 exemplarily illustrates a pixel prediction method in a verticaldirection.

FIG. 3 exemplarily illustrates a pixel prediction method in a horizontaldirection.

FIG. 4 is a block view showing an encoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

FIG. 5 exemplarily illustrates a zigzag scanning method used in thepresent invention.

FIG. 6 exemplarily illustrates a horizontal scanning method used in thepresent invention.

FIG. 7 exemplarily illustrates a vertical scanning method used in thepresent invention.

FIG. 8 illustrates a method for predicting pixel similarity in verticaland horizontal directions in accordance with an embodiment of thepresent invention.

FIG. 9 is a flowchart describing an adaptive scanning method based onpixel similarity in a vertical intra prediction mode in accordance withan embodiment of the present invention.

FIG. 10 is a flowchart describing an adaptive scanning method based onpixel similarity in a horizontal intra prediction mode in accordancewith an embodiment of the present invention.

FIG. 11 is a block view showing a decoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

BEST MODE FOR THE INVENTION

The advantages, features and aspects of the invention will becomeapparent from the following description of the embodiments withreference to the accompanying drawings, which is set forth hereinafter.When it is considered that detailed description on a related art mayobscure a point of the present invention, the description will not beprovided herein. Hereinafter, specific embodiments of the presentinvention will be described in detail with reference to the accompanyingdrawings.

FIG. 4 is a block view showing an encoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

As illustrated in FIG. 4, the encoding apparatus based on DCTcoefficient scanning adaptive to pixel similarity includes a modeselection unit 10, an intra prediction unit 20, a DCT and quantizationunit 30, and an entropy encoding unit 40.

The mode selection unit 10 selects an optimal mode among severalavailable prediction modes for intra prediction. In other words, itselects one among a plurality of possible encoding modes when 4×4,16×16, or 8×8 intra prediction is performed. Generally, the modeselection unit 10 selects one mode according to a rate-distortionoptimization method for reducing an amount of distortion at a given bitrate.

The intra prediction unit 20 receives a video, and performs 4×4 intraprediction for pixels of luminance blocks and 8×8 intra prediction forpixels of chrominance blocks based on a mode selected in the modeselection unit 10.

The DCT and quantization unit 30 performs DCT and quantization ontodifference values outputted from the mode selection unit 10, that is,onto residual coefficient blocks indicating differences between pixelvalues of macro blocks of a current frame to be encoded and predictedpixel values, and transmits resulting coefficients to the entropyencoding unit 40.

The entropy encoding unit 40 arrays DCT coefficients obtained in the DCTand quantization unit 30 by using an adaptive DCT coefficient scanningbased on pixel similarity, performs entropy encoding onto the arrayedDCT coefficients, and outputs an encoded video bitstream in accordancewith the result.

Herein, the entropy encoding is an encoding technique for enhancing acompression rate by allocating a few bits to data highly likely to occurand many bits to data that are not likely to occur. Examples of theentropy encoding used in the present invention include Context-basedAdaptive Variable Length Coding (CAVLC) or Context-based Adaptive BinaryArithmetic Coding (CABAC).

With reference to FIGS. 8 to 10, described hereafter are a method ofpredicting pixel similarity in vertical and horizontal directions in theentropy encoding unit 40, and a scanning method in vertical andhorizontal intra prediction modes.

FIG. 5 exemplarily illustrates a typical zigzag scanning method used inthe present invention. FIG. 6 exemplarily illustrates a typicalhorizontal scanning method used in the present invention. FIG. 7exemplarily illustrates a typical vertical scanning method used in thepresent invention.

As shown in FIG. 5, the zigzag scanning method used in the presentinvention is devised in consideration that low frequency components oftransformed coefficients acquired from the DCT and quantization arehighly likely to be positioned in the upper left part of atwo-dimensional plane. It takes advantage of a transformed coefficientenergy compaction characteristic that coefficients after DCTcollectively appear in low frequencies, whereas coefficients after DCTless appear in high frequencies.

The zigzag scanning method may be more efficient when pixel similarityin the horizontal direction is similar to the pixel similarity in thevertical direction.

However, when intra prediction encoding, particularly, vertical orhorizontal intra prediction, is performed, the similarity of theresidual coefficients in the vertical direction shows much differencefrom the similarity in the horizontal direction. Thus, theabove-described coefficient distribution is not always effective.Therefore, it is inefficient to apply the zigzag scanning to predictionof all directions.

To describe an example of the vertical prediction mode, the verticalprediction mode is selected as an optimal mode in a rate-distortionoptimization process, when the pixel similarity in the verticaldirection is high. Herein, significant coefficients are distributed inthe first row. Therefore, the horizontal scanning shown in FIG. 6 ismore efficient than the typical zigzag scanning.

Meanwhile, to describe an example of the horizontal prediction mode, thehorizontal prediction mode is selected as an optimal mode, when thepixel similarity in the horizontal direction is high. Herein,significant coefficients are distributed in the first column. Therefore,the vertical scanning shown in FIG. 7 is more efficient.

However, since the pixel similarity before intra prediction is differentfrom pixel similarity of residual coefficients after the intraprediction, it is inefficient to simply use the scanning method of FIG.6 or FIG. 7 according to the intra prediction mode.

Therefore, if pixel similarities in the vertical and horizontaldirections of a block to be encoded are predicted based on similarityinformation among adjacent block boundary pixels which are alreadyrecovered and an adaptive scanning method according to the predictionresult is used, the encoding efficiency can be increased.

FIG. 8 illustrates a method for predicting pixel similarity in verticaland horizontal directions in accordance with an embodiment of thepresent invention.

As illustrated in FIG. 8, pixels A, B, C and D are positioned adjacentto the upper part of a current block to be encoded, whereas pixels E, F,G and H are positioned adjacent to the left part of the current block tobe encoded.

Herein, when vertical prediction encoding is performed, thevertical-directional pixel similarity of the pixels a, e, i and m in thefirst column of the current block to be encoded is the same as thevertical-directional pixel similarity of residual coefficients a-A, e-A,i-A, and m-A after vertical prediction. This is because the residualcoefficients a-A, e-A, i-A, and m-A are differentiated by the sameprediction pixel A from the pixels a, e, i and m, and thus thecorrelation does not change.

Also, the vertical-directional pixel similarity of the pixels in columns2, 3 and 4 of the current block to be encoded is the same as thevertical-directional pixel similarity of residual coefficients aftervertical prediction.

However, the horizontal-directional pixel similarity of the pixels a, b,c and d in the first row of the current block to be encoded is differentfrom the horizontal-directional pixel similarity of residualcoefficients a-A, b-B, c-C, and d-D after vertical prediction. Also, thehorizontal-directional pixel similarity before vertical prediction ishigher than the horizontal-directional pixel similarity after thevertical prediction. Thus, it becomes similar to or higher than thevertical-directional pixel similarity.

Likewise, in the case of the horizontal prediction encoding, thehorizontal-directional pixel similarity of the pixels a, b, c and d inthe first row of the current block to be encoded is the same as thehorizontal-directional pixel similarity of residual coefficients a-E,b-E, c-E, and d-E after horizontal prediction. Also, thehorizontal-directional pixel similarity of the pixels in rows 2, 3 and 4of the current block to be encoded is the same as thehorizontal-directional pixel similarity of the residual coefficientsafter horizontal prediction.

However, the vertical-directional pixel similarity of the pixels a, e, iand m in the first column of the current block to be encoded isdifferent from the vertical-directional pixel similarity of residualcoefficients a-E, e-F, i-G, and m-H after horizontal prediction. Also,the vertical-directional pixel similarity before horizontal predictionis higher than the vertical-directional pixel similarity after thehorizontal prediction. Thus, it becomes similar to or higher than thehorizontal-directional pixel similarity.

As described above, when the pixel similarities in the vertical andhorizontal directions are similar, a general zigzag scanning method ismore efficient than the horizontal and vertical scanning methods.

Therefore, when the vertical intra prediction mode is performed and thevertical-directional pixel similarity of residual coefficients is highand their horizontal-directional pixel similarity is low, it is moreefficient to use the horizontal scanning.

Meanwhile, when the horizontal intra prediction mode is performed andthe horizontal-directional pixel similarity of residual coefficients ishigh and their vertical-directional pixel similarity is low, it is moreefficient to use the vertical scanning.

When the vertical-directional pixel similarity of recovered 8 pixels A,B, C, D, E, F, G and H of FIG. 8 is referred to as S_VER and theirhorizontal-directional pixel similarity is referred to as S_HOR, thepixel similarities for increasing the efficiency of 4×4 predictionencoding can be calculated using the following Equation 1.

$\begin{matrix}{{{S\_ VER} = \frac{1}{{Variance}\left( {E,F,G,H} \right)}}{{S\_ HOR} = \frac{1}{{Variance}\left( {A,B,C,D} \right)}}} & {{Equation}\mspace{14mu} 1}\end{matrix}$

In Equation 1, Variance( )denotes a dispersion; E, F, G and H denotepixels adjacent to the left part of the current block to be encoded; andA, B, C and D denote pixels adjacent to the upper part of the currentblock to be encoded.

When the vertical prediction mode is carried out, a value obtained bymultiplying S_HOR by a multiplication factor α (α≧1) is used as ahorizontal-directional pixel similarity prediction value of residualcoefficients of the current block. Herein, the α value is fixed at 2 inan experiment. The S_VER as it is is used as a vertical-directionalpixel similarity prediction value of the residual coefficients of thecurrent block.

When the horizontal prediction mode is carried out, a value obtained bymultiplying S_VER by a multiplication factor β (β≧1) is used as avertical-directional pixel similarity prediction value of the residualcoefficients of the current block. Herein, the β value is fixed at 2 inan experiment. The S_HOR as it is is used as a horizontal-directionalpixel similarity prediction value of the residual coefficients of thecurrent block.

The vertical-directional and horizontal-directional pixel similarityprediction values acquired in the above methods are compared to eachother to decide a scanning method.

Although a 4×4 intra prediction mode is described in the above example,the present invention is not limited to the 4×4 intra prediction mode,and the present invention can be applied to an M×N intra predictionmode, too.

Hereinafter, a method of selecting a scanning method in the vertical andhorizontal intra prediction modes will be described in detail withreference to FIGS. 9 and 10.

FIG. 9 is a flowchart describing an adaptive scanning method based onpixel similarity in a vertical intra prediction mode in accordance withan embodiment of the present invention.

In case of a vertical intra prediction mode in step S601, an S_VER valueand a value of α×S_HOR are compared in step S602. When the S_VER valueis greater than the value of α×S_HOR, a horizontal scanning method isused in step S603. When the S_VER value is smaller than the value ofα×S_HOR, a zigzag scanning method is used in step S604.

Herein, when a vertical-directional pixel similarity of the currentblock to be encoded based on similarity of adjacent pixels is predictedhigher than the horizontal-directional pixel similarity thereof,transformed coefficients obtained after DCT and quantization are highlylikely to be distributed in a direction horizontal to a first row of theblock. Therefore, the horizontal scanning method can bring about a highencoding efficiency.

FIG. 10 is a flowchart describing an adaptive scanning method based onpixel similarity in a horizontal intra prediction mode in accordancewith an embodiment of the present invention.

In case of a horizontal intra prediction mode in step S701, an S_HORvalue and a value of β×S_VER are compared in step S702. When the S_HORvalue is greater than the value of β×S_VER, a vertical scanning methodis used in step S703. When the S_HOR value is smaller than the value ofβ×S_VER, a zigzag scanning method is used in step S704.

Herein, when a horizontal-directional pixel similarity of the currentblock to be encoded based on similarity of adjacent pixels is predictedhigher than the vertical-directional pixel similarity thereof,transformed coefficients obtained after DCT and quantization are highlylikely to be disposed in a direction vertical to a first row of theblock. Therefore, the vertical scanning method can bring about a highencoding efficiency.

FIG. 11 is a block view showing a decoding apparatus using an adaptiveDCT coefficient scanning based on pixel similarity in accordance with anembodiment of the present invention.

As shown in FIG. 11, the decoding apparatus using an adaptive DCTcoefficient scanning based on pixel similarity includes an entropydecoding unit 50, a scanning decision unit 60, and a video recovery unit70.

The entropy decoding unit 50 receives an encoded video bitstream encodedin the encoding apparatus of FIG. 4 using an adaptive DCT coefficientscanning based on pixel similarity and decodes it through an entropydecoding method such as CAVLC or CABAC. Then, the entropy decoding unit50 transmits the entropy-decoded video bitstream to the scanningdecision unit 60.

The scanning decision unit 60 decides a scanning method for thecoefficients decoded in the entropy decoding unit 50 according to anintra prediction mode, as described in the above with reference to FIGS.8 to 11.

The video recovery unit 70 finally recovers the coefficients by usingthe scanning method decided in the scanning decision unit 60 to recoverthe video.

An experiment was carried out for diverse test videos using Joint Model86 (JM86), which is an H.264/AVC Reference Codec, according to theabove-described methods. The result of an increase in compressionefficiency was as follows. In the experiment, videos recommended byH.264/AVC as test videos were used. The following Table 1 showsconditions of the experiment.

TABLE 1 News Container Coast Paris Coast Video (QCIF) (QCIF) (QCIF)(QCIF) (CIF) Entire 300 300 300 300 300 Frame (30 Hz) (30 Hz) (30 Hz)(35 Hz) (30 Hz) Conditions CAVLC, Intra only, QP(18,22,26,30),rate-distortion optimization

As shown in Table 1, five test videos with different sizes were used forthe experiment.

The following Table 2 presents video compression rates when the testvideos were compressed using a conventional compression method, which isa zigzag scanning method of H.264/AVC, and the compression method of thepresent invention, which is the adaptive scanning method according tointra prediction mode under the same conditions as the Table 1.

TABLE 2 Method of the Present Bit H.264/AVC Invention Saving PSNR Bitrate PSNR Bit rate rate Sequence QP (dB) (Kbps) (dB) (Kbps) (%) News 1845.64 2370.65 45.64 2344.75 1.51% (QCIF) 22 43.06 1714.99 43.05 1692.691.67% 26 40.32 1221.96 40.32 1206.02 1.51% 30 37.50 872.65 37.49 860.231.49% Container 18 44.84 874.63 44.84 857.75 1.93% (QCIF) 22 41.71643.42 41.7 630.5 2.01% 26 38.61 451.07 38.61 441.54 2.11% 30 35.77317.36 35.76 309.93 2.34% Coast 18 44.18 2200.99 44.13 2152.15 2.22%(QCIF) 22 40.61 1631.56 40.59 1592.37 2.40% 26 37.13 1139.76 37.12111.02 2.52% 30 34.00 765.52 33.99 746.77 2.45% Paris 18 44.72 4360.4144.71 4271.09 2.05% (CIF) 22 41.57 3334.22 41.56 3259.84 2.23% 26 38.252450.69 38.24 2391.77 2.40% 30 35.04 1780.73 35.03 1736.21 2.50% (Coast)18 44.34 4068.4 44.33 4015.7 1.30% (CIF) 22 40.8 2989.5 40.8 2950.651.30% 26 37.32 2074.47 37.32 2045.89 1.38% 30 34.21 1388.07 34.221369.23 1.36%

The Table 2 shows that the result of video compression using theadaptive scanning method according to the intra prediction mode, whichis suggested in the present invention, is superior to that of videocompression using only the conventional zigzag scanning method ofH.264/AVC.

The method of the present invention described above may be realized as aprogram and stored in a computer-readable recording medium such as aCD-ROM, RAM, ROM, floppy disks, hard disks, magneto-optical disks and soforth. Since the program can be easily implemented by those skilled inthe art to which the present invention pertains, further description ofthe program will not be provided herein.

While the present invention has been described with respect to certainpreferred embodiments, it will be apparent to those skilled in the artthat various changes and modifications may be made without departingfrom the scope of the invention as defined in the following claims.

What is claimed is:
 1. A decoding method comprising: performing entropydecoding of encoded video information to obtain transform coefficients;selecting a scanning mode for the transform coefficients; and scanningthe transform coefficients based on the selected scanning mode; whereinthe selecting of a scanning mode comprises selecting the scanning modebased on an intra prediction mode that was used to obtain differencevalues between pixel values and predicted pixel values.
 2. The decodingmethod of claim 1, wherein the selecting of the scanning mode based onan intra prediction mode comprises: selecting a horizontal scanning modewhen the intra prediction mode is a vertical intra prediction mode; andselecting a vertical scanning mode when the intra prediction mode is ahorizontal intra prediction mode.